//: C08:ConstMember.cpp
// From Thinking in C++, 2nd Edition
// Available at http://www.BruceEckel.com
// (c) Bruce Eckel 1999
// Copyright notice in Copyright.txt
class X
{
    int i;
public:
    X(int ii);
    int f() const;
};

X::X(int ii) : i(ii) {}
int X::f() const
{
    return i;
}

int main()
{
    X x1(10);
    const X x2(20);
    x1.f();
    x2.f();
} ///:~
